﻿using System.ComponentModel.DataAnnotations;

namespace Md.Api.Model.Manage.SysDept.Request;
/// <summary>
/// 分页获取系统部门列表请求实体
/// </summary>
public class RequestGetSysDeptPageListModel : RequestBaseModel
{
    /// <summary>
    /// 父部门id
    /// </summary>
    public long? ParentId { get; set; }
    /// <summary>
    /// 祖级列表
    /// </summary>
    public string? Ancestors { get; set; }
    /// <summary>
    /// 部门名称
    /// </summary>
    public string? DeptName { get; set; }
    /// <summary>
    /// 负责人
    /// </summary>
    public string? Leader { get; set; }
    /// <summary>
    /// 联系电话
    /// </summary>
    public string? Phone { get; set; }
    /// <summary>
    /// 邮箱
    /// </summary>
    public string? Email { get; set; }
    /// <summary>
    /// 部门状态（0正常 1停用）
    /// </summary>
    [StringLength(1, ErrorMessage = "部门状态长度为1")]
    public string? Status { get; set; }
    /// <summary>
    /// 创建者
    /// </summary>
    public string? CreateBy { get; set; }
    /// <summary>
    /// 更新者
    /// </summary>
    public string? UpdateBy { get; set; }
    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? BeginDate { get; set; }
    /// <summary>
    /// 结束时间
    /// </summary>
    public DateTime? EndDate { get; set; }
    /// <summary>
    /// 排序字段
    /// </summary>
    public string OrderBy { get; set; } = string.Empty;
    /// <summary>
    /// 是否倒序
    /// </summary>
    public bool IsDesc { get; set; }
    /// <summary>
    /// 当前页
    /// </summary>
    [Required(ErrorMessage = "当前页数不能为空")]
    public int PageIndex { get; set; }
    /// <summary>
    /// 每页条数
    /// </summary>
    [Required(ErrorMessage = "每页条数不能为空")]
    public int PageSize { get; set; }
}

